package testJdk.lambda.testPredicate;

import com.google.common.collect.Lists;
import org.junit.Test;

import java.util.List;

/**
 * @version 1.0.0
 * Created by cyd on 2021-12-15 11:32:20
 * @ClassName : learn_jdk.lambda.testPredicate.PredicateTester
 * @Description : 类描述
 */
public class PredicateTester {

    @Test
    public void testFilter() {
        List<Integer> list = Lists.newArrayList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
        List<Integer> newList = PredicateUtil.filter(list, (x) -> {
            // 定义判断的逻辑
            return x > 8;
        });
        System.out.println(newList);
    }
}
